package com.office;

import java.sql.Connection;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

import com.office.db.DatabaseSqliteUtil;


public class Main {
    
    public static void main(String[] args) {

        ApplicationContext beanFactory=new FileSystemXmlApplicationContext("E:/workspaces/workspace5/office/WebContent/WEB-INF/webApplicationContext.xml"); 
        DatabaseSqliteUtil databaseUtil=(DatabaseSqliteUtil)beanFactory.getBean("databaseUtil");
        Connection conn=databaseUtil.getConnection();
        System.out.println(databaseUtil.test(conn));
        DatabaseSqliteUtil.closeConnection(conn);
        
    }
}
